import {
  SystemPrefixQuery,
  SystemZeroCodeSave,
  SystemZeroCodeFindById,
  SystemWorkSheetTable,
} from "@/services/api";
import { request, METHOD } from "@/utils/request";

/**
 * 获取所有前缀
 */
export function systemPrefix(param) {
  return request(SystemPrefixQuery, METHOD.POST, param);
}

/**
 * 保存
 */
export async function save(form) {
  return request(SystemZeroCodeSave, METHOD.POST, form);
}

/**
 * 根据Id获取
 */
export function findById(id) {
  return request(SystemZeroCodeFindById + "/" + id, METHOD.GET, {});
}

/**
 * 创建表
 */
export function table(param) {
  return request(SystemWorkSheetTable, METHOD.POST, param);
}

export default {
  save,
  findById,
  table,
  systemPrefix,
};
